//
// CTransform.java
// Copyright (C) 2010  "Naush" <naush _ hotmail _ fr>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program.  If not, see <http://www.gnu.org/licenses/>./* ----------------------------------------------------------------------------







package org.ryzom.nel.threed;

import org.ryzom.nel.misc.CRGBA;
import org.ryzom.nel.misc.CVector;

public class CTransform extends ITransformable {
  private long swigCPtr;

  public CTransform(long cPtr, boolean cMemoryOwn) {
    super(nel3dJNI.CTransform_SWIGUpcast(cPtr), cMemoryOwn);
    swigCPtr = cPtr;
  }

  public static long getCPtr(CTransform obj) {
    return (obj == null) ? 0 : obj.swigCPtr;
  }

  public synchronized void delete() {
    if (swigCPtr != 0) {
      if (swigCMemOwn) {
        swigCMemOwn = false;
        throw new UnsupportedOperationException("C++ destructor does not have public access");
      }
      swigCPtr = 0;
    }
    super.delete();
  }

  public static void registerBasic() {
    nel3dJNI.CTransform_registerBasic();
  }

  public CScene getOwnerScene() {
    long cPtr = nel3dJNI.CTransform_getOwnerScene(swigCPtr, this);
    return (cPtr == 0) ? null : new CScene(cPtr, false);
  }

  public void update() {
    nel3dJNI.CTransform_update(swigCPtr, this);
  }

  public void initModel() {
    nel3dJNI.CTransform_initModel(swigCPtr, this);
  }

  public void traverseHrc() {
    nel3dJNI.CTransform_traverseHrc(swigCPtr, this);
  }

  public void traverseClip() {
    nel3dJNI.CTransform_traverseClip(swigCPtr, this);
  }

  public void traverseAnimDetail() {
    nel3dJNI.CTransform_traverseAnimDetail(swigCPtr, this);
  }

  public void traverseLoadBalancing() {
    nel3dJNI.CTransform_traverseLoadBalancing(swigCPtr, this);
  }

  public void traverseLight() {
    nel3dJNI.CTransform_traverseLight(swigCPtr, this);
  }

  public void traverseRender() {
    nel3dJNI.CTransform_traverseRender(swigCPtr, this);
  }

  public boolean clip() {
    return nel3dJNI.CTransform_clip(swigCPtr, this);
  }

  public void profileRender() {
    nel3dJNI.CTransform_profileRender(swigCPtr, this);
  }

  public UTransform buildMatchingUserInterfaceObject() {
    long cPtr = nel3dJNI.CTransform_buildMatchingUserInterfaceObject(swigCPtr, this);
    return (cPtr == 0) ? null : new UTransform(cPtr, false);
  }

  public void setTransparency(boolean v) {
    nel3dJNI.CTransform_setTransparency(swigCPtr, this, v);
  }

  public void setOpacity(boolean v) {
    nel3dJNI.CTransform_setOpacity(swigCPtr, this, v);
  }

  public void setBypassLODOpacityFlag(boolean bypass) {
    nel3dJNI.CTransform_setBypassLODOpacityFlag(swigCPtr, this, bypass);
  }

  public boolean getBypassLODOpacityFlag() {
    return nel3dJNI.CTransform_getBypassLODOpacityFlag(swigCPtr, this);
  }

  public long isOpaque() {
    return nel3dJNI.CTransform_isOpaque(swigCPtr, this);
  }

  public long isTransparent() {
    return nel3dJNI.CTransform_isTransparent(swigCPtr, this);
  }

  public void setOrderingLayer(long layer) {
    nel3dJNI.CTransform_setOrderingLayer(swigCPtr, this, layer);
  }

  public long getOrderingLayer() {
    return nel3dJNI.CTransform_getOrderingLayer(swigCPtr, this);
  }

  public void setTransparencyPriority(short priority) {
    nel3dJNI.CTransform_setTransparencyPriority(swigCPtr, this, priority);
  }

  public short getTransparencyPriority() {
    return nel3dJNI.CTransform_getTransparencyPriority(swigCPtr, this);
  }

  public void hide() {
    nel3dJNI.CTransform_hide(swigCPtr, this);
  }

  public void show() {
    nel3dJNI.CTransform_show(swigCPtr, this);
  }

  public void setUserClipping(boolean enable) {
    nel3dJNI.CTransform_setUserClipping(swigCPtr, this, enable);
  }

  public boolean getUserClipping() {
    return nel3dJNI.CTransform_getUserClipping(swigCPtr, this);
  }

  public void heritVisibility() {
    nel3dJNI.CTransform_heritVisibility(swigCPtr, this);
  }

  public CHrcTrav.TVisibility getVisibility() {
    return CHrcTrav.TVisibility.swigToEnum(nel3dJNI.CTransform_getVisibility(swigCPtr, this));
  }

  public CSkeletonModel getSkeletonModel() {
    long cPtr = nel3dJNI.CTransform_getSkeletonModel(swigCPtr, this);
    return (cPtr == 0) ? null : new CSkeletonModel(cPtr, false);
  }

  public CSkeletonModel getAncestorSkeletonModel() {
    long cPtr = nel3dJNI.CTransform_getAncestorSkeletonModel(swigCPtr, this);
    return (cPtr == 0) ? null : new CSkeletonModel(cPtr, false);
  }

  public void hrcLinkSon(CTransform son) {
    nel3dJNI.CTransform_hrcLinkSon(swigCPtr, this, CTransform.getCPtr(son), son);
  }

  public void hrcUnlink() {
    nel3dJNI.CTransform_hrcUnlink(swigCPtr, this);
  }

  public CTransform hrcGetParent() {
    long cPtr = nel3dJNI.CTransform_hrcGetParent(swigCPtr, this);
    return (cPtr == 0) ? null : new CTransform(cPtr, false);
  }

  public long hrcGetNumChildren() {
    return nel3dJNI.CTransform_hrcGetNumChildren(swigCPtr, this);
  }

  public CTransform hrcGetChild(long index) {
    long cPtr = nel3dJNI.CTransform_hrcGetChild(swigCPtr, this, index);
    return (cPtr == 0) ? null : new CTransform(cPtr, false);
  }

  public void clipAddChild(CTransform son) {
    nel3dJNI.CTransform_clipAddChild(swigCPtr, this, CTransform.getCPtr(son), son);
  }

  public void clipDelChild(CTransform son) {
    nel3dJNI.CTransform_clipDelChild(swigCPtr, this, CTransform.getCPtr(son), son);
  }

  public void clipUnlinkFromAll() {
    nel3dJNI.CTransform_clipUnlinkFromAll(swigCPtr, this);
  }

  public long clipGetNumParents() {
    return nel3dJNI.CTransform_clipGetNumParents(swigCPtr, this);
  }

  public CTransform clipGetParent(long index) {
    long cPtr = nel3dJNI.CTransform_clipGetParent(swigCPtr, this, index);
    return (cPtr == 0) ? null : new CTransform(cPtr, false);
  }

  public long clipGetNumChildren() {
    return nel3dJNI.CTransform_clipGetNumChildren(swigCPtr, this);
  }

  public CTransform clipGetChild(long index) {
    long cPtr = nel3dJNI.CTransform_clipGetChild(swigCPtr, this, index);
    return (cPtr == 0) ? null : new CTransform(cPtr, false);
  }

  public ITrack getDefaultTrack(long valueId) {
    long cPtr = nel3dJNI.CTransform_getDefaultTrack(swigCPtr, this, valueId);
    return (cPtr == 0) ? null : new ITrack(cPtr, false);
  }

  public void registerToChannelMixer(CChannelMixer chanMixer, String prefix) {
    nel3dJNI.CTransform_registerToChannelMixer(swigCPtr, this, CChannelMixer.getCPtr(chanMixer), chanMixer, prefix);
  }

  public void setChannelMixerOwnerShip(boolean enable) {
    nel3dJNI.CTransform_setChannelMixerOwnerShip__SWIG_0(swigCPtr, this, enable);
  }

  public void setChannelMixerOwnerShip() {
    nel3dJNI.CTransform_setChannelMixerOwnerShip__SWIG_1(swigCPtr, this);
  }

  public boolean getChannelMixerOwnerShip() {
    return nel3dJNI.CTransform_getChannelMixerOwnerShip(swigCPtr, this);
  }

  public void freeze() {
    nel3dJNI.CTransform_freeze(swigCPtr, this);
  }

  public void setDontUnfreezeChildren(boolean val) {
    nel3dJNI.CTransform_setDontUnfreezeChildren(swigCPtr, this, val);
  }

  public void freezeHRC() {
    nel3dJNI.CTransform_freezeHRC(swigCPtr, this);
  }

  public void unfreezeHRC() {
    nel3dJNI.CTransform_unfreezeHRC(swigCPtr, this);
  }

  public long isQuadGridClipEnabled() {
    return nel3dJNI.CTransform_isQuadGridClipEnabled(swigCPtr, this);
  }

  public SWIGTYPE_p_NLMISC__CMatrix getWorldMatrix() {
    return new SWIGTYPE_p_NLMISC__CMatrix(nel3dJNI.CTransform_getWorldMatrix(swigCPtr, this), false);
  }

  public void setWorldMatrix(SWIGTYPE_p_NLMISC__CMatrix mat) {
    nel3dJNI.CTransform_setWorldMatrix(swigCPtr, this, SWIGTYPE_p_NLMISC__CMatrix.getCPtr(mat));
  }

  public boolean isHrcVisible() {
    return nel3dJNI.CTransform_isHrcVisible(swigCPtr, this);
  }

  public boolean isClipVisible() {
    return nel3dJNI.CTransform_isClipVisible(swigCPtr, this);
  }

  public void setClusterSystem(CInstanceGroup pCS) {
    nel3dJNI.CTransform_setClusterSystem(swigCPtr, this, CInstanceGroup.getCPtr(pCS), pCS);
  }

  public CInstanceGroup getClusterSystem() {
    long cPtr = nel3dJNI.CTransform_getClusterSystem(swigCPtr, this);
    return (cPtr == 0) ? null : new CInstanceGroup(cPtr, false);
  }

  public void resetLighting() {
    nel3dJNI.CTransform_resetLighting(swigCPtr, this);
  }

  public long isLightable() {
    return nel3dJNI.CTransform_isLightable(swigCPtr, this);
  }

  public void setUserLightable(boolean enable) {
    nel3dJNI.CTransform_setUserLightable(swigCPtr, this, enable);
  }

  public boolean getUserLightable() {
    return nel3dJNI.CTransform_getUserLightable(swigCPtr, this);
  }

  public void freezeStaticLightSetup(SWIGTYPE_p_p_NL3D__CPointLight pointLight, long numPointLights, short sunContribution, CPointLight frozenAmbientlight) {
    nel3dJNI.CTransform_freezeStaticLightSetup(swigCPtr, this, SWIGTYPE_p_p_NL3D__CPointLight.getCPtr(pointLight), numPointLights, sunContribution, CPointLight.getCPtr(frozenAmbientlight), frozenAmbientlight);
  }

  public void unfreezeStaticLightSetup() {
    nel3dJNI.CTransform_unfreezeStaticLightSetup(swigCPtr, this);
  }

  public long isBigLightable() {
    return nel3dJNI.CTransform_isBigLightable(swigCPtr, this);
  }

  public boolean useMergedPointLight() {
    return nel3dJNI.CTransform_useMergedPointLight(swigCPtr, this);
  }

  public CLightContribution getLightContribution() {
    return new CLightContribution(nel3dJNI.CTransform_getLightContribution(swigCPtr, this), false);
  }

  public void getLightHotSpotInWorld(CVector modelPos, SWIGTYPE_p_float modelRadius) {
    nel3dJNI.CTransform_getLightHotSpotInWorld(swigCPtr, this, CVector.getCPtr(modelPos), modelPos, SWIGTYPE_p_float.getCPtr(modelRadius));
  }

  public void setLogicInfo(ILogicInfo logicInfo) {
    nel3dJNI.CTransform_setLogicInfo(swigCPtr, this, ILogicInfo.getCPtr(logicInfo), logicInfo);
  }

  public void getAABBox(SWIGTYPE_p_NLMISC__CAABBox bbox) {
    nel3dJNI.CTransform_getAABBox(swigCPtr, this, SWIGTYPE_p_NLMISC__CAABBox.getCPtr(bbox));
  }

  public void setLoadBalancingGroup(String group) {
    nel3dJNI.CTransform_setLoadBalancingGroup(swigCPtr, this, group);
  }

  public String getLoadBalancingGroup() {
    return nel3dJNI.CTransform_getLoadBalancingGroup(swigCPtr, this);
  }

  public long isSkeleton() {
    return nel3dJNI.CTransform_isSkeleton(swigCPtr, this);
  }

  public long isSkinned() {
    return nel3dJNI.CTransform_isSkinned(swigCPtr, this);
  }

  public boolean getSkinBoneBBox(SWIGTYPE_p_NLMISC__CAABBox arg0, long arg1) {
    return nel3dJNI.CTransform_getSkinBoneBBox(swigCPtr, this, SWIGTYPE_p_NLMISC__CAABBox.getCPtr(arg0), arg1);
  }

  public void setMeanColor(CRGBA color) {
    nel3dJNI.CTransform_setMeanColor(swigCPtr, this, CRGBA.getCPtr(color), color);
  }

  public CRGBA getMeanColor() {
    return new CRGBA(nel3dJNI.CTransform_getMeanColor(swigCPtr, this), true);
  }

  public long isAnimDetailable() {
    return nel3dJNI.CTransform_isAnimDetailable(swigCPtr, this);
  }

  public long isLoadBalancable() {
    return nel3dJNI.CTransform_isLoadBalancable(swigCPtr, this);
  }

  public long isRenderable() {
    return nel3dJNI.CTransform_isRenderable(swigCPtr, this);
  }

  public long isMeshBaseInstance() {
    return nel3dJNI.CTransform_isMeshBaseInstance(swigCPtr, this);
  }

  public long isTransformShape() {
    return nel3dJNI.CTransform_isTransformShape(swigCPtr, this);
  }

  public long isCluster() {
    return nel3dJNI.CTransform_isCluster(swigCPtr, this);
  }

  public boolean supportFastIntersect() {
    return nel3dJNI.CTransform_supportFastIntersect(swigCPtr, this);
  }

  public boolean fastIntersect(CVector arg0, CVector arg1, SWIGTYPE_p_float arg2, SWIGTYPE_p_float arg3, boolean arg4) {
    return nel3dJNI.CTransform_fastIntersect(swigCPtr, this, CVector.getCPtr(arg0), arg0, CVector.getCPtr(arg1), arg1, SWIGTYPE_p_float.getCPtr(arg2), SWIGTYPE_p_float.getCPtr(arg3), arg4);
  }

  public void enableFastIntersectSupport(boolean enable) {
    nel3dJNI.CTransform_enableFastIntersectSupport(swigCPtr, this, enable);
  }

  public void enableCastShadowMap(boolean state) {
    nel3dJNI.CTransform_enableCastShadowMap(swigCPtr, this, state);
  }

  public boolean canCastShadowMap() {
    return nel3dJNI.CTransform_canCastShadowMap(swigCPtr, this);
  }

  public void enableReceiveShadowMap(boolean state) {
    nel3dJNI.CTransform_enableReceiveShadowMap(swigCPtr, this, state);
  }

  public boolean canReceiveShadowMap() {
    return nel3dJNI.CTransform_canReceiveShadowMap(swigCPtr, this);
  }

  public long modelCanCastShadowMap() {
    return nel3dJNI.CTransform_modelCanCastShadowMap(swigCPtr, this);
  }

  public long modelCanReceiveShadowMap() {
    return nel3dJNI.CTransform_modelCanReceiveShadowMap(swigCPtr, this);
  }

  public void generateShadowMap(CVector arg0) {
    nel3dJNI.CTransform_generateShadowMap(swigCPtr, this, CVector.getCPtr(arg0), arg0);
  }

  public CShadowMap getShadowMap() {
    long cPtr = nel3dJNI.CTransform_getShadowMap(swigCPtr, this);
    return (cPtr == 0) ? null : new CShadowMap(cPtr, false);
  }

  public void getReceiverBBox(SWIGTYPE_p_NLMISC__CAABBox bbox) {
    nel3dJNI.CTransform_getReceiverBBox(swigCPtr, this, SWIGTYPE_p_NLMISC__CAABBox.getCPtr(bbox));
  }

  public void receiveShadowMap(CShadowMap arg0, CVector arg1, CMaterial arg2) {
    nel3dJNI.CTransform_receiveShadowMap(swigCPtr, this, CShadowMap.getCPtr(arg0), arg0, CVector.getCPtr(arg1), arg1, CMaterial.getCPtr(arg2), arg2);
  }

  public SWIGTYPE_p_NLMISC__CMatrix getReceiverRenderWorldMatrix() {
    return new SWIGTYPE_p_NLMISC__CMatrix(nel3dJNI.CTransform_getReceiverRenderWorldMatrix(swigCPtr, this), false);
  }

  public void setGeneratingShadowMap(boolean state) {
    nel3dJNI.CTransform_setGeneratingShadowMap(swigCPtr, this, state);
  }

  public boolean isGeneratingShadowMap() {
    return nel3dJNI.CTransform_isGeneratingShadowMap(swigCPtr, this);
  }

  public boolean computeWorldBBoxForShadow(SWIGTYPE_p_NLMISC__CAABBox arg0) {
    return nel3dJNI.CTransform_computeWorldBBoxForShadow(swigCPtr, this, SWIGTYPE_p_NLMISC__CAABBox.getCPtr(arg0));
  }

  public void renderIntoSkeletonShadowMap(CSkeletonModel arg0, CMaterial arg1) {
    nel3dJNI.CTransform_renderIntoSkeletonShadowMap(swigCPtr, this, CSkeletonModel.getCPtr(arg0), arg0, CMaterial.getCPtr(arg1), arg1);
  }

  public void setShadowMapDirectionZThreshold(float zthre) {
    nel3dJNI.CTransform_setShadowMapDirectionZThreshold(swigCPtr, this, zthre);
  }

  public float getShadowMapDirectionZThreshold() {
    return nel3dJNI.CTransform_getShadowMapDirectionZThreshold(swigCPtr, this);
  }

  public void setShadowMapMaxDepth(float depth) {
    nel3dJNI.CTransform_setShadowMapMaxDepth(swigCPtr, this, depth);
  }

  public float getShadowMapMaxDepth() {
    return nel3dJNI.CTransform_getShadowMapMaxDepth(swigCPtr, this);
  }

  public void setForceClipRoot(boolean forceClipRoot) {
    nel3dJNI.CTransform_setForceClipRoot(swigCPtr, this, forceClipRoot);
  }

  public boolean getForceClipRoot() {
    return nel3dJNI.CTransform_getForceClipRoot(swigCPtr, this);
  }

  public boolean isFlare() {
    return nel3dJNI.CTransform_isFlare(swigCPtr, this);
  }

  public void setSSSWO(boolean state) {
    nel3dJNI.CTransform_setSSSWO(swigCPtr, this, state);
  }

  public boolean getSSSWO() {
    return nel3dJNI.CTransform_getSSSWO(swigCPtr, this);
  }

}
